package com.digitalchina.lxnsy.viewholder;

import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.TextView;

import com.digitalchina.lxnsy.R;
import com.digitalchina.lxnsy.entity.AssessOptsVO;
import com.jude.easyrecyclerview.adapter.BaseViewHolder;

/**
 * ================================================
 * 项目名称：BigData
 * 类描述：
 * 包名：com.digitalchina.bigdata.viewholder
 * 创建人：郑皓
 * 创建时间：2017/3/4 17:51
 * 修改备注：
 * ================================================
 */
public class AssessOptsHolder extends BaseViewHolder<AssessOptsVO> {

    private TextView textView;
    private CheckBox checkBox;

    public AssessOptsHolder(ViewGroup parent) {
        super(parent, R.layout.item_assess_opts);
        textView = $(R.id.assess_opts_tv_issue);
        checkBox = $(R.id.assess_opts_checkbox);
    }

    @Override
    public void setData(AssessOptsVO data) {
        super.setData(data);

        textView.setText(data.getName());

        if (data.isChecked())
            checkBox.setChecked(true);
        else
            checkBox.setChecked(false);
    }

}

